area->width, area->height);
#endif
- gtk_snapshot_offset (snapshot, -priv->xoffset, -priv->yoffset);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (-priv->xoffset, -priv->yoffset));
gtk_text_layout_snapshot (priv->layout,
widget,
gtk_widget_get_height (widget)
});
- gtk_snapshot_offset (snapshot, priv->xoffset, priv->yoffset);
+ gtk_snapshot_restore (snapshot);
}
static void
if (GTK_TEXT_VIEW_GET_CLASS (text_view)->snapshot_layer != NULL)
{
- gtk_snapshot_offset (snapshot, -priv->xoffset, -priv->yoffset);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (-priv->xoffset, -priv->yoffset));
GTK_TEXT_VIEW_GET_CLASS (text_view)->snapshot_layer (text_view, GTK_TEXT_VIEW_LAYER_BELOW_TEXT, snapshot);
- gtk_snapshot_offset (snapshot, priv->xoffset, priv->yoffset);
+ gtk_snapshot_restore (snapshot);
}
gtk_text_view_paint (widget, snapshot);
if (GTK_TEXT_VIEW_GET_CLASS (text_view)->snapshot_layer != NULL)
{
- gtk_snapshot_offset (snapshot, -priv->xoffset, -priv->yoffset);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (-priv->xoffset, -priv->yoffset));
GTK_TEXT_VIEW_GET_CLASS (text_view)->snapshot_layer (text_view, GTK_TEXT_VIEW_LAYER_ABOVE_TEXT, snapshot);
- gtk_snapshot_offset (snapshot, priv->xoffset, priv->yoffset);
+ gtk_snapshot_restore (snapshot);
}
}